package com.itic.appbase.framework.type;

public enum DealState {

    Apply("0","申请退款"),RefundIng("1","退款中"),RefundSuccess("2","退款成功"),RefundFail("3","退款失败");

    private String state;
    private String name;

    DealState(String state, String name) {
        this.state = state;
        this.name = name;
    }

    public String getState() {
        return state;
    }

    public String getName() {
        return name;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static DealState getDealState(String state){
        DealState dealState = null;
        switch (state){
            case "0":
                dealState =DealState.Apply;
                break;
            case "1":
                dealState =DealState.RefundIng;
                break;
            case "2":
                dealState =DealState.RefundSuccess;
                break;
            case "3":
                dealState =DealState.RefundFail;
                break;
        }
        return dealState;
    }
}
